import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:getx_scaffold/getx_scaffold.dart';
import 'package:oramemo/common/styles/colors.dart';
import 'package:oramemo/entity/device_mine_entity.dart';
import 'package:oramemo/generated/assets.dart';
import 'package:oramemo/pages/facility/blue/blue_logic.dart';
import 'package:oramemo/pages/facility/facility_router.dart';
import 'package:oramemo/widget/my_app_bar.dart';

import 'setting_logic.dart';
import 'widgets/check_vol.dart';
import 'widgets/setting_vol.dart';

class SettingPage extends StatelessWidget {
  const SettingPage({super.key});

  @override
  Widget build(BuildContext context) {
    final SettingLogic logic = Get.put(SettingLogic());
    final BlueLogic blueLogic = Get.put(BlueLogic());
    final DeviceMineData deviceModel = logic.deviceModel;

    return Scaffold(
      appBar: AppBar(title: Text(deviceModel.device?.deviceName ?? '--'), actions: [
        IconButton(
            onPressed: () {
              Get.toNamed(FacilityRouter.deviceDetailPage ,arguments: deviceModel);
            },
            icon: const Icon(Icons.more_horiz))
      ]),
      body: Column(
        children: [
          SizedBox(width: 30.h,),
          SettingVolview(),
          // ButtonX.text('text',onPressed: (){
          //   Get.toNamed(FacilityRouter.deviceDetailPage ,arguments: deviceModel);},),
          CheckVolView(),
        ],
      ),
    );
  }

}
